using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Egg : MonoBehaviour
{
    public EngineObject mainEngine;
    public EngineObject leftAssitantEngine;
    public EngineObject rightAssitantEngine;
    private void Awake()
    {
        var mainEnginePart = new Engine();
        var leftAssitantEnginePart = new Engine();
        var rightAssitantEnginePart = new Engine();
        mainEnginePart.powerMax = 16;
        leftAssitantEnginePart.powerMax = 10;
        rightAssitantEnginePart.powerMax = 10;
        mainEngine.m_Part = mainEnginePart;
        leftAssitantEngine.m_Part = leftAssitantEnginePart;
        rightAssitantEngine.m_Part = rightAssitantEnginePart;
    }
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKey(KeyCode.W) && mainEngine)
            mainEngine.realPower = 1;
        if (Input.GetKey(KeyCode.S) && mainEngine)
            mainEngine.realPower = -1;
        if (Input.GetKey(KeyCode.A) && rightAssitantEngine)
            rightAssitantEngine.realPower = 1;
        if (Input.GetKey(KeyCode.D) && leftAssitantEngine)
            leftAssitantEngine.realPower = 1;
    }
}
